<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>WISSC轮滑教培服务网-查询系统</title>
<#assign base=request.contextPath  />
    <link rel="icon" href="${base}/favicon.ico">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css" media="all">
    <script type="text/javascript" src="${base}/js/feng.js"></script>
    <script src="${base}/js/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/css/hzw-city-picker.css">
    <script type="text/javascript" src="${base}/js/city-data.js"></script>
    <script type="text/javascript" src="${base}/js/hzw-city-picker.min.js"></script>
    <script src="${base}/frame/layui/layui.all.js"></script>

    <script type="text/javascript" src="${base}/js/threeLevelLinkage/worldAddress.js"></script>
    <script type="text/javascript" src="${base}/js/threeLevelLinkage/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="${base}/js/threeLevelLinkage/TestAddress.js"></script>
    <script type="text/javascript" src="${base}/js/threeLevelLinkage/TestChooseAddress.js"></script>

</head>
<body>
<div style="background-color:  #A60000">
    <i class="layui-icon layui-icon-shrink-right"  style="color: white">&nbsp;&nbsp;&nbsp;&nbsp;个人列表</i>
</div>

<div overflow="hidden">
<div class="shuiping" id="url"  style="margin-left:100px; float: left"></div>
<div class="div" style="margin-left: 20px; float: left" >
    <table class="layui-table" lay-even="" lay-skin="nob" lay-size="sm">
        <colgroup>
            <col width="200">
            <col width="200">
            <col width="200">

        </colgroup>
        <thead>
        <tr>
            <th>姓  名</th>
            <th id="name">${model.name}</th>
            <#--<th id="name"></th>-->
            <th>生  日</th>
            <th id="birth" >${data}</th>
            <th>身份证</th>
            <th id="idNumber">${model.idNumber}</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>所属地区</td>
            <td id="city">${model.city}</td>
            <td>所属战队</td>
            <td id="combat">${model.combat}</td>
            <td>赛  龄</td>
            <td id="raceAge">${model.raceAge}</td>
        </tr>
        <tr>
            <td>个人积分</td>
            <td id="ttintegral">${model.c}分</td>
            <td>登记证书</td>
            <td id="student"> ${student.count!''}张</td>
            <td>资格证书</td>
            <td id="occ">${occ.occ}张</td>
        </tr>
        <tr>
            <td style="color: red;font-weight: bold ">个人城市排名</td>
            <td id="cityRanking" style="color: red;font-weight: bold">${county2}位</td>

            <td style="color: red;font-weight: bold">个人省份排名</td>
            <td id="provinceRanking" style="color: red;font-weight: bold">${county1}位</td>

            <td style="color: red;font-weight: bold">个人国家排名</td>
            <td id="nationalRanking" style="color: red;font-weight: bold">${county}位</td>
        </tr>
        </tbody>
    </table>
</div>
</div>
<hr>
<div style="background-color:  #A60000">
    <i class="layui-icon layui-icon-shrink-right"  style="color: white">&nbsp;&nbsp;&nbsp;&nbsp;赛事经历</i>
</div>
<table  class="layui-hide" id="event"></table>

<button class="layui-btn" lay-submit lay-filter="formDemo" type="button"
         id="abc" style="background-color: #0092EF;">生成海报
</button>
<script>
    $('#abc').on('click',function () {
        var sum =
            "姓名："+$("#name").text()+
            ", 生日："+$("#birth").text()+
            ", 身份证："+$("#idNumber").text() +
            ", 所属地区："+$("#city").text()+
            " 所属战队："+$("#combat").text()+
            ", 赛龄："+$("#raceAge").text() +
            ", 个人积分："+$("#ttintegral").text()+
            ", 登记证书："+$("#student").text()+
            ", 资格证书："+$("#occ").text() +
            ", 个人城市排名："+$("#cityRanking").text()+
            ", 个人省份排名："+$("#provinceRanking").text()+
            ", 个人国家排名："+$("#nationalRanking").text();
        window.location.href = "${base}/individualEvent/getPoster?sum="+sum+"&idNumber="+${idNumber};

    });

  /*  function onSubmit() {

        var sum = "姓名："+$("#name").text()+", 生日："+$("#birth").text()+", 身份证："+$("#idNumber").text()
            +", 所属地区："+$("#city").text()+" 所属战队："+$("#combat").text()+", 赛龄："+$("#raceAge").text()
            +", 个人积分："+$("#ttintegral").text()+", 登记证书："+$("#student").text()+", 资格证书："+$("#occ").text()
            + ", 个人城市排名："+$("#cityRanking").text()+", 个人省份排名："+$("#provinceRanking").text()+", 个人国家排名："+$("#nationalRanking").text();
        alert(sum)*/
          /* window.location.href = "${base}/individualEvent/getPoster?sum="+sum"&idNumber="+${idNumber}";*/
        <#--$.ajax({-->
        <#--    type: "POST", //提交方式-->
        <#--    traditional: true,//这里设置为true,不然后台接收到的参数会带上[]，导致数据无法正常接收-->
        <#--    url: "",//路径-->
        <#--    data: {sum: sum, idNumber: ${idNumber}},-->
        <#--    success: function (data) {//返回数据根据结果进行相应的处理-->
        <#--        if (data == "true"){-->
        <#--            alert("生成成功 查看D盘")-->
        <#--        } else{-->
        <#--            alert("生成失败")-->
        <#--        }-->
        <#--    }-->
        <#--});-->
 /*   }*/
</script>

<script>
     window.onload=function () {
        $.ajax({
            url:"${base}/individualEvent/selectByIdNumber?idNumber=${idNumber}",
            type: "GET",   //请求方式
            async:false,
            success: function (data) {


                $("#url").html(
                        '<img src="${base}/individualEvent/getPhoto?path=' + data[0].url + '" style="width: 130px;height: 130px; position: relative; right: 20px; top: 5px;">'
                );



            }
        })
        
    }
</script>

<script>
    layui.use('table', function(){
        var table = layui.table;

        table.render({
            elem: '#event'
            ,height: 250
            ,url:'${base}/individualEvent/listIndividualEvent?idNumber=${idNumber}&name=${name}'
            ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
            ,cols: [[
                {field:'matchTime',  title: '赛事时间', templet: function (val) {
                    if(val.matchTime==undefined){
                        return "";
                    }

                    return DateFormat(val.matchTime);
                }, align: 'center'}
                ,{field:'matchName', title: '赛事名称', align: 'center'}
                ,{field:'ranking',  title: '获得排名', align: 'center'}
                ,{field:'integral', title: '获得积分', align:  'center'}

            ]]
            , id: 'testReload'
            , page: {
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                , theme: '#0092EF'
                , limit: 10
            }
        });
    });


</script>

</body>
</html>